Skip to main content

Using onlySettings property in a content type

The onlySetting property indicates that a content type is meant for settings only.

For instance, you might use this attribute for content types that do not require storefront content, such as an SEO page.

Image 1Image 2
without-propertywith-property
Image 1 - Content type without onlySettings and with two tabs: Sections and SEO.Image 2 - Content type with onlySettings and with one tab for settings: SEO.

This property ensures that the content type's page displays only the available settings without the Section tab. Follow the steps below to use the onlySettings property for your desired content type.

Step-by-step​

  1. Go to the store's repository and access CMS > content-types.json.
  2. Choose your desired content type and add the onlySettings property as true. For example:
    {
"id": "SEO",
"name": "Global SEO Settings",
"onlySettings": true,
"configurationSchemaSets": [
{
"name": "SEO",
"configurations": [
...
]
}
]
}
  1. Sync your changes in the CMS folder by running the following command:
vtex cms sync

After syncing your changes, go to your store's Admin and select Storefront > Headless CMS. Then, navigate to the content type to which you added the property and ensure the only tab available is for settings.

Didn't find your answers? Ask the Community. For documentation suggestions, submit your feedback.

JOIN THE COMMUNITY

ON THIS PAGE